[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
VPUTCHR
. Summary
vputchr(int <chr>);
. Description
The vputchr function is used to place a character on the screen at
the current cursor position, specifying color information at the
same time. <chr> is the character to place on the screen. the low
byte contains the ASCII value for the character, while the second
byte contains the color value. In general, a if 'c' is the charac-
ter, and 'color' is the color to use, the proper value is obtained
with the expression
(c + color * 256)
Possible colors are numbered as follows:
Black 00
Blue 01
Green 02
Cyan 03
Red 04
Magenta 05
Brown 06
Light Grey 07
Dark Grey 08
Light Blue 09
Light Green 10
Light Cyan 11
Light Red 12
Light Magenta 13
Yellow 14
White 15
To obtain a color attribute value for a color combination, the for-
mula is
color attribute value =
foreground color value + (16 * background color value)
Therefore, a Yellow character on a Blue background would have a
color attribute value of 30 (14 + (16 * 1)).
. Return Value
None.
. Example
// Place an inverse 'X' in the left top corner of the screen
gotoxy(0, 0);
vputchr('X' + 112 * 256);
See Also:
vgetchr
pstra
vputchrs
vputchrsa
color chart
ASCII table
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson